package router

import (
	"github.com/kataras/iris/v12"
	"wit-admin-go/system/app/controller"
)

func WitCasbin(app iris.Party) {
	casbin := app.Party("/casbin")
	{
		casbin.Post("/addCasbin", controller.WitCasbin.AddCasbin).Name = "添加角色权限"
		casbin.Delete("/deleteCasbin", controller.WitCasbin.DeleteCasbin).Name = "删除角色权限"
		casbin.Post("/addRoleForUser", controller.WitCasbin.AddRoleForUser).Name = "添加用户角色"
		casbin.Delete("/deleteRoleForUser", controller.WitCasbin.DeleteRoleForUser).Name = "删除用户角色"
		casbin.Get("/getCasbinPolicy", controller.WitCasbin.GetCasbinPolicy).Name = "获取角色权限"
		casbin.Put("/putRoleForUser", controller.WitCasbin.PutRoleForUser).Name = "修改用户角色"
	}
}
